#lang sicp

;; require `Exercise-1.21.rkt`

(define (next p)
  (if (= p 2)
      3
      (+ p 2)))

(define (find-divisor n q)
  (cond ((> (square q) n) n)
        ((divides? n q) q)
        (else (find-divisor n (next q)))))

;; 基本符合